package com.yinbw.interview.controller;

import org.springframework.stereotype.Controller;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

@Controller
public class Question {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in); // 创建Scanner对象
        ArrayList<String> arrayList = new ArrayList<>();

        for (int i = 0; i < 10; i++) {
            arrayList.add(i+"");
        }
        System.out.println(arrayList);
        Collections.shuffle(arrayList);
        System.out.println(arrayList);
        for (String item : arrayList) {
            scanner.nextLine(); // 读取字符串
            System.out.println(item);
        }
        scanner.close(); // 关闭Scanner对象（可选）
    }
}
